#include <stdio.h>
#include <stdlib.h> 
int main()
{
	FILE* fp1, * fp2;
	char ch;
	char name1[20], name2[20], buff[256];
	printf("input source name\n");
	gets_s(name1);
	printf("input object name\n");
	gets_s(name2);
	if ((fp1 = fopen(name1, "r")) == NULL)
	{
		printf("open error");
		exit(0);
	}
	if ((fp2 = fopen(name2, "w")) == NULL)
	{
		printf("open error");
		exit(0);
	}
	while (fgets(buff, 256, fp1))
	{
		fputs(buff, fp2);
	}
	fclose(fp1);
	fclose(fp2);
	return 0;
}